<!DOCTYPE html>
<html>
<!-- 员工信息管理-编辑 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW50" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="Employeename">
                            <el-input type="text" v-model="Form.Employeename" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{EmployeeInformationManagement.Employeename+mark.m}}
                                </template>
                            </el-input>
                            <span class="iputLineMust" v-if="Form.Employeename.length<=0">
                                <!-- 必填项添加 -->
                                <img src="/static/images/exclamation.png" alt="">
                            </span>

                        </el-form-item>
                    </div>
                </el-col>

                <el-col :span="11" offset="2">
                    <el-form-item>
                        <div class="elst-select-mini" style="margin-left: -100px">
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{EmployeeInformationManagement.Dateofentry+mark.m}}
                                </template>
                                <el-date-picker slot="suffix" v-model="Form.Dateofentry" type="date" size="mini"
                                    format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                                </el-date-picker>
                            </el-input>
                            <span class="iputLineMust" v-if="Form.Dateofentry.length<=0">
                                <!-- 必填项添加 -->
                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </div>
                    </el-form-item>
                </el-col>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="Founder">
                            <el-input type="text" v-model="Form.Founder" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{EmployeeInformationManagement.Founder+mark.m}}
                                </template>
                            </el-input>
                            <span class="iputLineMust" v-if="Form.Founder.length<=0">
                                <!-- 必填项添加 -->
                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11" :offset="2">
                    <div class="elst-select-mini">
                        <el-form-item prop="position">
                            <el-input type="text" v-model="Form.position" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{EmployeeInformationManagement.position+mark.m}}
                                </template>
                            </el-input>
                            <span class="iputLineMust" v-if="Form.position.length<=0">
                                <!-- 必填项添加 -->
                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="Telephonecontact">
                            <el-input type="text" v-model="Form.Telephonecontact" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{EmployeeInformationManagement.Telephonecontact+mark.m}}
                                </template>
                            </el-input>
                            <span class="iputLineMust" v-if="Form.Telephonecontact.length<=0">
                                <!-- 必填项添加 -->
                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11" :offset="2">
                    <div class="elst-select-mini">
                        <el-form-item prop="department">
                            <el-input type="text" v-model="Form.department" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{EmployeeInformationManagement.department+mark.m}}
                                </template>
                            </el-input>
                            <span class="iputLineMust" v-if="Form.department.length<=0">
                                <!-- 必填项添加 -->
                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                value1: '',
                // picked : '1',
                //父业传参
                id: '',
                //获取下拉菜单frequency
                frequency: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    Name: '',
                    Dateofaddition: '',
                    Conferencecontent: '',
                    Employeename:'',
                    Dateofentry:'',
                    Founder:'',
                    position:'',
                    Telephonecontact:'',
                    department:'',
                },

                //表单验证
                rules: {
                    Name: [
                        verification.NotNull,
                    ],
                    Dateofaddition: [
                        verification.NotNull,
                    ],
                    Conferencecontent: [
                        verification.NotNull,
                    ],


                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //PDF上传成功
                pdfok: function () {
                    this.$message({
                        message: 'PDF上传成功',
                        type: 'success'
                    });
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/EmployeeInformationManagement/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/EmployeeInformationManagement/get?id=' + this.id);
                    this.Form.frequency = this.Form.frequency + "";
                },
            },
            mounted: function () {

                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                // this.frequency = getDicData('56');
                //初始化数据
                // this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);

            },

        });
    </script>
</body>

</html>